package cn.minsh.lims.eoms.common.utils;

import cn.minsh.lims.eoms.common.exception.RRException;
import org.springframework.validation.BindingResult;

public class ParamUtils {

    /**
     * 检查参数是否按要求传
     * @param binding
     */
    public static void check(BindingResult binding) {
        if(binding.hasErrors()){
            throw new RRException(binding.getFieldError().getDefaultMessage());
        }
    }
}
